package com.gaofeng.customviewdemo

import android.graphics.Color
import android.os.Bundle
import android.widget.ImageView
import androidx.appcompat.app.AppCompatActivity
import com.amulyakhare.textdrawable.TextDrawable

class TextShapeActivity : AppCompatActivity() {

    private lateinit var ivTextShape: ImageView
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_text_shape)
        ivTextShape = findViewById(R.id.iv_shape)
        val drawable = TextDrawable.builder().buildRoundRect("ABc", Color.RED,10)
        ivTextShape.setImageDrawable(drawable)
    }
}